// 基础类型
let username:string

let age:number

let isDone:boolean 

let studentIds:string[];

let students:{name:string;age:number}[]; //定义对象数组

let data:Date;

let u:undefined=undefined;

let nill:null=null;

let reg:RegExp=/a/; //正则表达式

let pp:[string,number]=["Alice",30]; //还可以定义元组类型的基础类型

// 枚举类型
enum Color{
    Red=1,
    Green,
    Blue
}

let color:Color=Color.Green;

// 字符串枚举，丢失反向映射
enum Dir{
    Up="上",
    Down="下"
}

type Direction="north" | "south" | "east" | "west";
let direction:Direction='north';
// console.log(direction)

studentIds=['h']

